﻿using Shop.Core.Share;
using Shop.Model.Dto.User;
using Shop.Model.View;

namespace Shop.IServices
{
    public interface IAccountAppService : IAppService
    {

        /// <summary>
        /// 小程序登录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<UseTokenInfoView> WeChatAppletLogin(WeChatLoginDto dto);

        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<AppResult<UseTokenInfoView>> Register(UserRegistrationDto dto,long userId);

        /// <summary>
        /// 密码登录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<UseTokenInfoView> PasswordLogin(PasswordLoginDto dto);

        /// <summary>
        /// 发送登录验证码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult> SendLoginCode(string input);

        /// <summary>
        /// 验证码登录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<AppResult<UseTokenInfoView>> SMSLogin(PhoneCodeDto dto);

        /// <summary>
        /// 发送验证码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult> SendRegisterCode(string input);

        /// <summary>
        /// 注册验证
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppResult<bool>> CheckRegisterCode(PhoneCodeDto input);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        Task<UseTokenInfoView> GetUserToken(string phone);
    }
}